<?php
if (!defined('IN_CONTEXT')) die('access violation error!');
?>
<script type="text/javascript" language="javascript">
<!--
function check_editrole_info(thisForm)
{
	$("#stat").css({"display":"block"});
	$("#stat").html("正在保存内容......");
	_ajax_submit(thisForm, on_success, on_failure);
	return false;
}

function on_success(response)
{
	response1 = eval("("+response+")");
	var stat = document.getElementById("stat");
	if(response1.result == 'ok')
	{
		alert(response1.sucmsg);
		stat.innerHTML = "OK，正在重定向......";
		reloadPage();
	}
	else if(response1.result == 'error')
	{
		stat.innerHTML = response1.errmsg;
	}
}

function on_failure(response)
{
	var stat = document.getElementById("stat");
	stat.innerHTML = response;
}
-->
</script>
<style type="text/css">
table {
	margin-top:20px;
}
table td {
	 text-align:left;
}
</style>
<div id="stat" style="display:none;"></div>
<form action="index.php" method="post" onsubmit="javascript:return check_editrole_info(this);">
<table width="100%" border="0" cellpadding="2" cellspacing="0" bordercolor="#4c4c4c">
<tr><td>*角色:</td><td><input type="text" name="r_alias" value="<?php echo $role['r_alias'];?>"/></td></tr>
<tr><td>备注:</td><td><textarea name="r_desc"><?php echo $role['r_desc'];?></textarea></td></tr>
<input type="hidden" name='_m' value="<?php echo $next_controller;?>"/>
<input type="hidden" name='_a' value="<?php echo $next_action;?>"/>
<input type="hidden" name='r_id' value="<?php echo $role['r_id'];?>"/>
<tr><td colspan="2"><input type="submit" value="修改"/><input type="reset" value="重置"/></td></tr>
</table>
</form>